package com.fourth.service.impl;

import com.fourth.dao.BusinessDao;
import com.fourth.dao.GoodsDao;
import com.fourth.service.UBGoodsService;

import com.github.pagehelper.PageInfo;
import com.ljx.entity.BusinessInfo;
import com.ljx.entity.Goods;
import com.ljx.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xiaoZhu
 * @version 1.0
 * @date 2023/3/2 10:39
 */
@Service
public class UBGoodsServiceImpl implements UBGoodsService {
    @Autowired
    private GoodsDao goodsDao;

    @Override
    public Result selectAll(String id) {
//        Integer currentPage,Integer pageSize
//        PageHelper.startPage(currentPage,pageSize);
        List<Goods> list=goodsDao.selectAll(id);
        PageInfo<Goods> info = new PageInfo<>(list);
        return new Result(2000,"查询成功",info);
    }
    @Autowired
        private BusinessDao businessDao;

    @Override
    public Result selectB(String id) {
        BusinessInfo info = businessDao.selectById(id);
        return new Result(200,"查询成功",info);
    }
}
